from selenium.webdriver.common.by import By

from base.base_action import BaseAction


class SearchPage(BaseAction):

    # 含义_控件的类型

    # username_edit_text
    # login_button
    # find_password_button


    # 输入框
    keyword_edit_text = By.CLASS_NAME, "android.widget.EditText"

    # 返回
    back_button = By.XPATH, "//*[@content-desc='收起']"


    # 动作_含义

    # click_login
    # input_xx
    # get_xx_text


    def input_keyword(self, text):
        self.send_keys(self.keyword_edit_text, text)

    def click_back(self):
        self.click(self.back_button)